package com.example.mybatisdemo.mapper;

import com.example.mybatisdemo.entity.StudentDO;
import com.example.mybatisdemo.entity.StudentDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author swxu_2005@163.com
 * @date 2018/12/13
 */
@Mapper
public interface StudentMapper {

  List<StudentDO> findAllStudents();

  List<StudentDO> findStudents(String sex);

  List<StudentDO> findStudentsMultiParams(@Param("name") String name,
                                          @Param("minScore") BigDecimal minScore,
                                          @Param("maxScore")BigDecimal maxScore);

  List<StudentDO> findStudentsUsingMap(Map<String, Object> paramMap);

  List<StudentDTO> findStudentWithMoreInfo1();

  List<StudentDTO> findStudentWithMoreInfo2();

}
